home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 84 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  3.3 KB

  1. Path: mail2news.demon.co.uk!sisyphus.demon.co.uk
  2. From: Dave.Sparks@sisyphus.demon.co.uk
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: PPC compilers
  5. Date: Tue, 2 Jan 96 19:32:22 +0000 (GMT)
  6. Organization: to be supplied
  7. Distribution: world
  8. Message-ID: <19960102.46B6B0.1171E@sisyphus.demon.co.uk>
  9. References: <john.hendrikx.40ka@grafix.xs4all.nl> <19951223.57F728.6866@sisyphus.demon.co.uk> <4bqdk8$6g5@sunsystem5.informatik.tu-muenchen.de> <19951227.542040.7590@sisyphus.demon.co.uk> <4c9h7d$h3i@sunsystem5.informatik.tu-muenchen.de>
  10. X-NNTP-Posting-Host: sisyphus.demon.co.uk
  11. In-reply-to: fischerj@Informatik.TU-Muenchen.DE's message of 1 Jan 1996 20:46:37 GMT
  12. X-Attribution: DaveS
  13. Content-Length: 2600
  14. X-Lines: 66
  15. X-Mail2News-Path: relay-4.mail.demon.net!post.demon.co.uk!sisyphus.demon.co.uk
  16.  
  17. >>>>> "JF" == Juergen "Rally" Fischer <fischerj@Informatik.TU-Muenchen.DE> writes:
  18.  
  19.   JF> Dave.Sparks@sisyphus.demon.co.uk wrote:
  20.   >> >>>>> "JF" == Juergen "Rally" Fischer
  21.   >> <fischerj@Informatik.TU-Muenchen.DE> writes:
  22.  
  23.   >> The issue isn't whether or not it does it wrong, but whether what it
  24.   >> does is defined (for all 680xx processors).  If you know what
  25.   JF> agree.
  26.   >> this instruction is _defined_ to do, quote the definition.  Motorola's
  27.   >> definition, not yours.
  28.  
  29.   JF> mhm, is Hitatchi doku also ok ?
  30.  
  31.   JF> "adress register indirect with postincrement: The adress of the
  32.   JF> operand is in the adress register specified by the register field.
  33.   JF> AFTER THE OPERAND IS USED, IT IS INCREMENTED by one, two or four
  34.   JF> [...]"
  35.  
  36. My original post used PREDECREMENT, not postincrement.
  37.  
  38.   JF> I would interpret "after operand is used" that way:
  39.  
  40.   JF> when data from (a0) is read, a0 was used (used to build an adress).
  41.   JF> so a0 is incremented. then data is written at (a0)+.
  42.  
  43. "after the operand is used" does not necessarily mean "before
  44. the other operand is used".  A good definition leaves nothing
  45. to "interpretation".
  46.  
  47.   JF> As there are AFAIK no warnings in the docu, it's IMHO legal to assume
  48.   JF> the logic way (if my test code isn't wrong, the EC020 behaves exactly
  49.   JF> that way. 060 users tell your experiences ;)
  50.  
  51. You were criticising C because its definition very carefully
  52. states that the order of evaluation of expressions between control
  53. points is not fully defined, so expressions like
  54.  
  55.    *--A0 = *--A0;
  56.  
  57. do not give uniformly predictable results.  You then claim that
  58. assembly code is better because the assembly code definition gives
  59. no such warning for
  60.  
  61.    MOVE.L -(A0),-(A0)
  62.  
  63. leaving you free to assume that _all_ processors implementing this
  64. instruction use the interpretation you choose to use.
  65.  
  66. (BTW, if anyone wants to test this on an '060, remember that the
  67. effect may depend on whether A0 is used or modified in the few
  68. instructions executed before or after this one, or on the state of
  69. the instruction and data caches, or on ...)
  70.  
  71.   >> -- Dave.Sparks@sisyphus.demon.co.uk (Staffordshire, England)
  72.   >> ... details are more implementation-dependant than defined.
  73.  
  74. The line in my .sig is a direct quotation from another
  75. manufacturer's architecture manual.  It looks horrifying, but at
  76. least it's honest (and in context applies only to privileged
  77. instructions which would be used only in the operating system).
  78.  
  79. -- 
  80.         Dave.Sparks@sisyphus.demon.co.uk        (Staffordshire, England)
  81.  
  82.  ... details are more implementation-dependant than defined.
  83.  
  84.  
  85.